package cn.edu.lingnan.controller;

import cn.edu.lingnan.service.UserService;
import cn.edu.lingnan.entity.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("api/v1/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/info")
    public User getUserInfo(@RequestParam("id") Long id) {
        return userService.getById(id);
    }
} 